package com.visionet.waveletData.web.service.business.handlebars;

import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.HandlebarsException;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
import com.visionet.waveletData.web.common.utilities.props.PropsKeys;
import com.visionet.waveletData.web.common.utilities.props.PropsUtil;
import com.visionet.waveletData.web.common.utilities.time.DateUtil;
import com.visionet.waveletData.web.service.KeyWord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.io.File;

@Service
public class HandlebarsService {
    private static Logger logger = LoggerFactory.getLogger(HandlebarsService.class);


    private static Handlebars handlebars = new Handlebars(new ClassPathTemplateLoader("/templates"));

    static {
        handlebars.setPrettyPrint(true);
    }

    public final static String WriteRootPath = PropsUtil.getProperty(PropsKeys.UPLOAD_FILE_ROOT_PATH) +  "resource/";
    public final static String WebUrl = PropsUtil.getProperty(PropsKeys.SERVICE_DOMAIN)
            + PropsUtil.getProperty(PropsKeys.UPLOAD_FILE_DOWNLOAD_PATH) + "resource/";


}
